package com.rem.pojo;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.Map;

/**
 * @author remembrance
 * @version 1.0
 * @date 2021/11/8 17:05
 */
@Component
@ConfigurationProperties(prefix = "test")
public class Test {
    private String name;
    private Integer age;
    private String[] hobby;
    private Map<String,User> map;

    public Test() {
    }

    public Test(String name, Integer age, String[] hobby, Map<String, User> map) {
        this.name = name;
        this.age = age;
        this.hobby = hobby;
        this.map = map;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String[] getHobby() {
        return hobby;
    }

    public void setHobby(String[] hobby) {
        this.hobby = hobby;
    }

    public Map<String, User> getMap() {
        return map;
    }

    public void setMap(Map<String, User> map) {
        this.map = map;
    }

    @Override
    public String toString() {
        return "Test{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", hobby=" + Arrays.toString(hobby) +
                ", map=" + map +
                '}';
    }
}
